/*!
*
*@file Ellipse.h  
*@brief      This is a Ellipse drawing class, using Xlib the ellipse can be drawn on the Xlib window screen. 
*  Using Bresenham Algorithm the ellipse points on the quadrants can be obtained.
*
*       
*@author Vishwajeet Dusane
*/



#ifndef ELLIPSE_H
#define ELLIPSE_H



#include "MyDisplay.h"

#include <fstream>
#include <math.h>

using namespace std;

class Ellipse{

      /*!
      *@brief (x,y) coordinates 
      */
      int x,y;
      /*!
      *@brief
      * radius in x direction and radius in y direction
      */
      int radiusX,radiusY; 
      /*!
      *
      *@brief
      * dispaly window for printing ellipse on the Xlib window
      */
      MyDisplay *show;   
      
   public:
   
    Ellipse();
    Ellipse(const int radiusX,const int radiusY, const int x = 0,const int y = 0);
    Ellipse(const int radiusX,const int radiusY,const MyDisplay &another);
        
    //Ellipse(const Ellipse )
      
    Ellipse(const Ellipse &e1);  
     
    ~Ellipse();
    
    //draw circle
    
    /**
    *
    */
     bool draw();
     
     /*!
       *@brief 
       * Draw Ellipse with new coordinates x and y,
       *@param  coordinate x and y axis 
       *@return true if the ellipse is drawn successfully on the window   
       * 
       */
     bool draw(const int x,const int y);
     
     /*!
       *@brief 
       * Draw ellipse with radius in X direction and y direction on (x,y) point on the xlib window
       * \param radius in X direction and radius in Y direction,coordinates (x,y) 
       * \return true if the ellipse is drawn successfully on the xlib window  
       */
     
     bool draw(const int radiusX,const int radiusY,const int x,const int y);
     
        
     /*!
       *@brief 
       * Change the radius of the ellipse in x and y direction, if the y direction is not specified 
       * it will defult assign it to 1
       *@param radius in X direction and radius in Y direction
       *@return true if the radius has been changed successfully
       */ 
     bool changeRadius(const int radiusX,const int radiusY = 1);
     
     
     
      
 };
 
 #endif
 
 
 
 
